﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package reprise.core {

    public class ApplicationRegistry {

        protected var m_defaultApplication:Application;
        protected var m_applications:Object;

        protected static var g_instance:ApplicationRegistry;

        public function ApplicationRegistry(){
            m_applications = {};
        }
        public function applicationForURL(_arg1:String=null):Application{
            if (!_arg1){
                return (m_defaultApplication);
            };
            return (Application(m_applications[_arg1]));
        }
        public function registerApplication(_arg1:Application):void{
            m_applications[_arg1.applicationURL()] = _arg1;
            if (!m_defaultApplication){
                m_defaultApplication = _arg1;
            };
        }

        public static function instance():ApplicationRegistry{
            if (!g_instance){
                g_instance = new (ApplicationRegistry);
            };
            return (g_instance);
        }

    }
}//package reprise.core 
